import React, { Component } from 'react';
import reactCSS from 'reactcss'
import Header1 from '../components/Header1.jsx';
import Header2 from '../components/Header2.jsx';
import Namespaces1 from '../components/cssTests/Namespaces1/Namespaces1.jsx';
import Namespaces2 from '../components/cssTests/Namespaces2/Namespaces2.jsx';
import Cssinjs1 from '../components/cssTests/Cssinjs1/Cssinjs1.jsx';
import Cssinjs2 from '../components/cssTests/Cssinjs2/Cssinjs2.jsx';
import Cssinjs3 from '../components/cssTests/Cssinjs3/Cssinjs3.jsx';

console.log(reactCSS);
export default class Hello5 extends Component {
	// 总数据
	state = {
		// 新增-弹窗开头
		mag: 'h111',
		name: 'aaa'
	}
	searchList1 () {
		console.log(this.inputtest1);
		console.log(this.Header2Ref);
		this.inputtest1.current.focus();
		this.Header2Ref.current.searchList2();
	}
	// 挂载阶段-完成了React数据的初始化
	constructor (props) {
		super(props);
		this.inputtest1 = React.createRef();
		this.Header2Ref = React.createRef();
	}

	// 挂载阶段-渲染函数
    render() {
    	console.log('render1', 3);
    	
    	return (
			<div>
				<span onClick={() => this.searchList1()}>name:{this.state.name}</span>
				<input ref={this.inputtest1} />
				<Header1></Header1>
				<Header2 name={this.state.name} ref={this.Header2Ref}></Header2>
				<Namespaces1></Namespaces1>
				<Namespaces2></Namespaces2>
				<Cssinjs1></Cssinjs1>
				<Cssinjs2></Cssinjs2>
				<Cssinjs3></Cssinjs3>
			</div>
		);
    }
	
};
